class ChatMessage {
  final String sender;
  final String receiver;
  final String msg;
  final int isRead;
  final String addTime;
  
  const ChatMessage({
    required this.sender,
    required this.receiver,
    required this.msg,
    required this.isRead,
    required this.addTime
  });
  
  factory ChatMessage.fromJson(Map<String, dynamic> jsonobj) {
    var item = ChatMessage(
      sender:jsonobj['sender'],
      receiver:jsonobj['receiver'],
      msg:jsonobj['msg'],
      isRead:jsonobj['is_read'],
      addTime : jsonobj['add_time'],
    );
    return item;
  }
}
